package com.itheima.sh.c_Practice;
// 需求：求水仙花数和个数并输出控制台

public class ForTest05 {
    public static void main(String[] args) {
        int a=0;
        for (int i = 100; i <=999 ; i++) {
            int ge=i%10;
            int shi=i/10%10;
            int bai=i/100%10;
            if((ge*ge*ge+shi*shi*shi+bai*bai*bai)==i){
                a++;
                System.out.println(i);
            }

        }
        System.out.println("水仙花的个数是："+a);
    }
}
